/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Jiang Jinxi
 * Date: 2024-04-27
 * Time: 14:13
 */
public class MyInteger {
    private int value;
    public MyInteger(int value){
        this.value = value;
    }
    public int getValue(){
        return this.value;
    }
    public  boolean isEven(){
        return value%2 == 0;
    }
    public  boolean isOdd(){
        return value%2 != 0;
    }
    public  boolean isPrime(){
        int i = 2;
        for (; i < value; i++) {
            if(value/i == 0){
                return false;
            }
        }
        return true;
    }
    public static boolean isEven(int value){
        return value%2 == 0;
    }
    public static boolean isOdd(int value){
        return value%2 != 0;
    }
    public static boolean isPrime(int value){
        int i = 2;
        for (; i < value; i++) {
            if(value/i == 0){
                return false;
            }
        }
            return true;
    }
    public static boolean isEven(MyInteger myInteger){
        return myInteger.value%2 == 0;
    }
    public static boolean isOdd(MyInteger myInteger){
        return myInteger.value%2 != 0;
    }
    public static boolean isPrime(MyInteger myInteger){
        int i = 2;
        for (; i < myInteger.value; i++) {
            if(myInteger.value/i == 0){
                return false;
            }
        }
        return true;
    }
    public boolean equals(int value){
        return value == this.value;
    }
    public boolean equals(MyInteger myInteger){
        return myInteger.value == this.value;
    }
    public static int parseInt(char[] arr){
        String s = String.valueOf(arr);
        return Integer.valueOf(s);
    }
    public static int parseInt(String str){
        return Integer.valueOf(str);
    }

}
